<template>
  <div class="noticeDetail-container">
    <h1 class="title">{{detail.title}}</h1>
    <div class="time">{{detail.createtime}}</div>
    <div class="content" v-html="detail.content"></div>
  </div>
</template>
  <script>
export default {
  data() {
    return {
      detail: {}
    };
  },

  created() {
    this.id = this.$route.query.id;//作业id
    this.initAjaxMethod();
  },
  methods: {
    initAjaxMethod() {
      const toast=this.$toast.loading("加载中...");
      this.$http
        .post(this.$API.SET_PEROFFICE_NOTEDETAIL,{id:this.id})
        .then((res) => {
          toast.clear();
          if (res.code == 1) {
           this.detail=res.data || {};
          }
        });
    },
  }
};
  </script>
  
  <style lang="less">
.noticeDetail-container {
  .title {
    padding: 0.2rem;
    font-size:0.3rem;
    font-weight: bold;
    text-align: center;
  }
  .time {
    text-align: right;
    padding: 0 0.2rem;
    font-size: 0.3rem;
    color: #888;
  }
  .content {
    font-size: 0.3rem;
    line-height: 0.56rem;
    padding: 0.4rem 0.2rem 0.2rem 0.4rem;
  }
}
</style>
  